﻿/// <reference path="../_references.js" />

(function (e) {
    e.repositories = e.repositories || {};
    e.repositories.users = function () {
    };
    e.repositories.users.prototype = {
        getAllUsers: function (callback) {
            e.apiRepository.getAll("UserAccount", callback);
        },
        getEditViewModel: function (id, callback) {
            if (id)
                e.apiRepository.getOne("UserAccountViewModel", id, callback);
            else
                e.apiRepository.getAll("UserAccountViewModel", callback);
        },
        createUser: function (data, callback) {
            e.apiRepository.post("UserAccount", data, callback);
        }
    };
} (this.eg = this.eg || {}));